package com.ruoyi.ucar.domain;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.UCarBaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;

/**
 * 提现记录对象 t_withdraw_record
 * 
 * @author sungangbin
 * @date 2025-05-13
 */
@TableName("t_withdraw_record")
@Data
public class TWithdrawRecord extends UCarBaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @TableId(value="id",type = IdType.AUTO)
    private Long id;

    /** 提现记录表主键uuid */
    @Excel(name = "提现记录表主键uuid")
    @TableField("withdraw_record_uuid")
    private String withdrawRecordUuid;

    /** 关联客户UUID-指向客户主表 */
    @Excel(name = "关联客户UUID-指向客户主表")
    @TableField("customer_uuid")
    private String customerUuid;

    /** 提现金额 */
    @Excel(name = "提现金额")
    @TableField("withdraw_money")
    private BigDecimal withdrawMoney;

    /** 当前余额：old_balance-withdraw_money */
    @Excel(name = "当前余额：old_balance-withdraw_money")
    @TableField("now_balance")
    private BigDecimal nowBalance;

    /** 提现之前余额 */
    @Excel(name = "提现之前余额")
    @TableField("old_balance")
    private BigDecimal oldBalance;

    /** 提现日期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    @Excel(name = "提现日期时间", width = 30, dateFormat = "yyyy-MM-dd hh:mm:ss")
    @TableField("withdraw_datetime")
    private LocalDateTime withdrawDatetime;

    /** 提现方式 */
    @Excel(name = "提现方式")
    @TableField("withdraw_way")
    private String withdrawWay;


    /** 备注*/
    @Excel(name = "备注")
    @TableField("remark")
    private String remark;

    /** 创建人 */
    @Excel(name = "创建人")
    @TableField("created_by")
    private String createdBy;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("created_time")
    private Date createdTime;

    /** 更新人 */
    @Excel(name = "更新人")
    @TableField("updated_by")
    private String updatedBy;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("updated_time")
    private Date updatedTime;

    /** 删除标志 */
    @Excel(name = "删除标志")
    @TableField("delete_flag")
    private Long deleteFlag;


    /** 订单编码 */
    @Excel(name = "订单编码")
    @TableField("order_no")
    private String orderNo;

    /** 提现状态 */
    @Excel(name = "提现状态")
    @TableField("withdraw_status")
    private String withdrawStatus;

    @Excel(name = "提现类型")
    @TableField("withdraw_type")
    private String withdrawType;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("withdrawRecordUuid", getWithdrawRecordUuid())
            .append("customerUuid", getCustomerUuid())
            .append("withdrawMoney", getWithdrawMoney())
            .append("nowBalance", getNowBalance())
            .append("oldBalance", getOldBalance())
            .append("withdrawDatetime", getWithdrawDatetime())
            .append("withdrawWay", getWithdrawWay())
            .append("remark", getRemark())
            .append("createdBy", getCreatedBy())
            .append("createdTime", getCreatedTime())
            .append("updatedBy", getUpdatedBy())
            .append("updatedTime", getUpdatedTime())
            .append("deleteFlag", getDeleteFlag())
            .append("orderNo", getOrderNo())
            .append("withdrawStatus", getWithdrawStatus())
            .append("withdrawType", getWithdrawType())
                .toString();
    }
}
